#include "mainwindow.h"

#include <QApplication>
#include <QDebug>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QString cacheDirPath = QDir::currentPath() + "/cache";
    QDir dir(cacheDirPath);
    if(!dir.exists()) {
        dir.mkdir(cacheDirPath);
    } else {
        QFileInfoList fileList = dir.entryInfoList(); // 获取所有的文件信息
        //遍历文件信息
        foreach(QFileInfo file, fileList) {
            file.dir().remove(file.fileName());
        }
    }
    MainWindow w;
    w.show();
    return a.exec();
}
